package com.congee02.dbservlet.framework.ioc.utils;

import java.io.File;
import java.util.List;

public final class FileUtils {

    private FileUtils() {}

    public static void searchFiles(File dir, List<File> ans) {
        if (! dir.exists()) {
            return;
        }
        final File[] files = dir.listFiles();
        if (files != null) {
            for (File file : files) {
                if (file.isDirectory()) {
                    searchFiles(file, ans);
                } else {
                    ans.add(file);
                }
            }
        }
    }

}
